# Change
CXX = g++
CXXFLAGS = -Wall -g
PLATFORM = linux
JAVA_HOME = /home/jdk1.7.0_05
JAVA_LIB_DIR = -L$(JAVA_HOME)/jre/lib/amd64/server
JAVA_INC_DIRS = -I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux

# Do not change
OUTPUT_DIR = $(CURDIR)/../bin/$(PLATFORM)
SOURCES = in_main.cpp
OBJECTS = $(OUTPUT_DIR)/in_main.o

indev: $(OBJECTS)
	$(CXX) $(CXXFLAGS) $(OBJECTS) $(JAVA_LIB_DIR) -ljvm -o $(OUTPUT_DIR)/$@

$(OBJECTS): $(SOURCES)
	mkdir -p $(OUTPUT_DIR)
	$(CXX) $(CXXFLAGS) $(JAVA_INC_DIRS) -c $(SOURCES) -o $(OBJECTS)

clean:
	@echo Removing all object files and executables.
	rm -r $(OUTPUT_DIR)/*

